package com.nsyue.auth.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.nsyue.auth.domain.granter.PlatformAuthenticationToken;
import com.nsyue.auth.dto.SyncLoginDTO;
import com.nsyue.auth.dto.SyncRegisterDTO;
import com.nsyue.auth.entity.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.oauth2.provider.OAuth2Authentication;

import java.util.List;
import java.util.Map;

/**
 * 用户表(User)表服务接口
 *
 * @author laixm
 * @since 2023-05-06 15:18:01
 */
public interface UserService extends IService<User> {

    PlatformAuthenticationToken loadPlatformAuthenticationByPhone(String appid, String phone);

    OAuth2Authentication loadPrincipal(SyncLoginDTO syncLoginDTO, Map<String, String> parameters);

    String registerBatch(List<SyncRegisterDTO> registerDTOList);

    UserDetails loadUserByPlatformId(String platformId);
}

